package com.example.controller;

import com.alibaba.excel.EasyExcel;
import com.example.service.TUserInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;

/**
 * @Description:
 * @Date：Create in 2024-11-26 17:49
 * @Author: 刘雨
 */
@Controller
@RequestMapping("/view")
public class ViewModelController {

    private static final Logger log = LoggerFactory.getLogger(ViewModelController.class);

    @Autowired
    private TUserInfoService userInfoService;


    @GetMapping("/index")
    public ModelAndView getHtmlInit(){
        ModelAndView model = new ModelAndView("/index");
        model.addObject("userList", userInfoService.list());
        return model;
    }



}
